#!/usr/bin/env python
###
 # @Author: daniel
 # @Date: 2023-12-20 14:16:01
 # @LastEditTime: 2023-12-23 13:11:45
 # @LastEditors: daniel
 # @Description: 
 # @FilePath: /intrinsic_lora/train_normal.sh
 # have a nice day
### 


# source /usr/local/miniconda3/etc/profile.d/conda.sh 
source ~/miniconda3/etc/profile.d/conda.sh


# conda activate lora
conda activate yang_real

 
export MODEL_NAME="runwayml/stable-diffusion-v1-5"
export DATA_DIR="data/DIODE/normal"
export PSEUDO_DIR="data/DIODE/normal_pseudo"
export HF_HOME="path/to/HuggingFace/cache/folder"

output_dir='outputs'

rank=7;
bs=2;
# 

CUDA_VISIBLE_DEVICES='1,2,3,4,5,6,7' accelerate launch sd_single_diode_pseudo_normal.py \
--pretrained_model_name_or_path=$MODEL_NAME  \
--train_data_dir=$DATA_DIR \
--pseudo_root=$PSEUDO_DIR \
--output_dir=$output_dir \
--train_batch_size=$bs \
--dataloader_num_workers=4 \
--learning_rate=1e-4 \
--lr_warmup_steps=0 \
--max_train_steps=20000 \
--validation_steps=2500 \
--checkpointing_steps=2500 \
--rank=$rank \
--scene_types='outdoor,indoors' \
--num_train_imgs=4000 \
--unified_prompt='surface normal' \
--resume_from_checkpoint='latest' \
--seed=1234

